package com.cskaoyan.dbutils.resultsethandler;

import com.cskaoyan.connectionpool.DruidUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.MapHandler;

import java.sql.SQLException;
import java.util.Map;

public class MapHandlerDemo {


    public static void main(String[] args) throws SQLException {

        QueryRunner queryRunner = new QueryRunner(DruidUtils.getDataSource());

        Map<String,Object> map = queryRunner.query("select * from city where id = ?",new MapHandler(),2);

        System.out.println(map);
    }
}
